Connect to Leonardo.Ai with the MCP Server

Connect your AI assistant to Leonardo.Ai through the Model Context Protocol (MCP). You can generate images directly or work with the Leonardo Agent on a creative project.

Before you start

To use the Leonardo.Ai Connector, you’ll need:

  • An AI assistant that can use MCP servers, such as:
    • Cursor
    • Claude Code
    • Codex
    • ChatGPT
    • Claude
  • A Leonardo.Ai account

MCP V2 uses your Leonardo.Ai account. Generation uses personal credits by default or Team credits if a team is selected.

Connect your AI assistant

Use this server URL:

https://mcp.leonardo.ai/v2/mcp

Follow the instructions for your assistant below. Complete the browser sign-in with the Leonardo.Ai account you want to use.


  1. Open your project's .cursor/mcp.json file. Create the file if it does not exist.
  2. Add the following server configuration. If the file contains other servers, add this entry to its mcpServers object.
{
  "mcpServers": {
    "leonardo-ai": {
      "url": "https://mcp.leonardo.ai/v2/mcp",
      "auth": {
        "CLIENT_ID": "cursor"
      }
    }
  }
}
  1. Open Cursor's MCP settings.
  2. Complete authentication for leonardo-ai.
  3. Open an Agent conversation to use the tools.

See the Cursor MCP documentation for configuration details.

Usage

Generate Images

Ask your assistant:

Use Leonardo.Ai to create a landscape image of a coastal village at sunrise.

Generate Videos

Ask your assistant:

Use Leonardo.Ai to create a video of a card driving through a coastal village at sunrise.

Work with Leo Agent

Use Leo Agent for creative briefs, exploration, and iterative edits within a project.
A project preserves the conversation and generated assets. Continue in the same project for related work.

Ask your assistant:

Start a Leonardo Agent project for a coffee brand. Ask Leo to explore three visual directions for its packaging.

Turn one of the options into a 15-second video.

Continue the project by asking for edits:

Use the Leonardo Agent to cut the generated video down to a 10-second ad and a 6-second ad, with a music track playing underneath.


Did this page help you?